# encoding:UTF-8


# https://blog.csdn.net/mieleizhi0522/article/details/82142856

def foo():
    print("starting...")
    while True:
        # red = 1
        res = yield 4              # 先执行左边 再执行右边    # 传的值就是res
        # print("red:",red)
        print("res:", res)

g = foo()
print(next(g))
print("*"*20)
# print(next(g))
print(g.send(2))




